﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CustomControls.MessageBox
{
    /// <summary>
    /// MessageBoxShowSelectInfo.xaml 的交互逻辑
    /// </summary>
    public partial class MessageBoxShowSelectInfo : MessageBaseWindow
    {
        public MessageBoxShowSelectInfo(string content)
        {
            InitializeComponent();
            MessageInfo.Text = content;
            MessageBoxResult = System.Windows.MessageBoxResult.None;
        }

        /// <summary>
        /// 消息框按钮返回值
        /// </summary>
        public MessageBoxResult MessageBoxResult
        {
            get;
            set;
        }

        /// <summary>
        /// 获取或设置窗口的标题
        /// </summary>
        public new string Title
        {
            get { return base.Title; }
            set
            {
                base.Title = value;
                winContainer.Title = value;
            }
        }

        private void btn_confirm_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult = MessageBoxResult.OK;
            this.Close();
        }

        private void btn_Yes_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult = MessageBoxResult.Yes;
            this.Close();
        }

        private void btn_No_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult = MessageBoxResult.No;
            this.Close();
        }

        private void btn_cancel_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult = MessageBoxResult.Cancel;
            this.Close();
        }
    }
}
